package com.zretc.controller;

import com.zretc.entity.Notice;
import com.zretc.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 周文涛
 * 2020年8月30日18:39:43
 * 最新公告
 */
@RestController
@RequestMapping("/new")
public class NewNoticeController {

    @Autowired
    private NoticeService noticeService;

    @GetMapping("/notice")
    public Notice getNewNotice(){
        return noticeService.getNew();
    }
}
